package com.bdqn.controller;

import com.bdqn.pojo.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @Author 27435
 * @Date 2024/12/2614:08
 * @Version 1.0
 */

@Controller
public class LoginController {

    @RequestMapping(value = {"/login"}, produces = {"application/json;charset=UTF-8"})
    @ResponseBody
    public String login(@RequestBody List<User> users){
//        System.out.println(user.getName());
//        System.out.println(user.getAge());
        for (User user : users) {
            System.out.println(user);
        }
        return "login success";
    }

//    public String login(@RequestBody User user){
////        System.out.println(user.getName());
////        System.out.println(user.getAge());
//        System.out.println(user);
//        return "login success";
//    }

}
